<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="head.htm" />
</head>
<body>
	<div id="head">
		<h1>Autovermietung München</h1>
	</div>
	<jsp:include page="admin-menu.htm" />
	<div id="content">
		<h2>
			<c:out value="${title}" />
		</h2>
		<p>
			<c:out value="${message}" />
		</p>
		<table class="listing">
			<colgroup>
				<c:if test="${edit}">
					<col class="buttoncell" />
					<col class="buttoncell" />
				</c:if>
				<col />
				<col />
				<col />
			</colgroup>
			<tbody>
				<tr>
					<c:if test="${edit}">
						<th></th>
						<th></th>
					</c:if>
					<th>ID</th>
					<th>Marke</th>
					<th>Modell</th>
					<th>Tarif</th>
					<th>Kilometerstand</th>
					<th>Baujahr</th>
					<th>Farbe</th>
					<th>Kennzeichen</th>
					
				</tr>

				<c:forEach items="${autos}" var="auto">
					<tr>
						<c:if test="${edit}">
							<td><a href="SetAuto.html?id=<c:out value="${auto.id}"/>">
									<img src="images/button_edit.png" alt="Icon - Bearbeite Auto" />
							</a></td>
							<td><a
								href="DeleteAuto.html?id=<c:out value="${auto.id}"/>"> <img
									src="images/button_drop.png" alt="Icon - Lösche Auto" />
							</a></td>
						</c:if>
						<td><c:out value="${auto.id}" /></td>
						<td><c:choose>
								<c:when test="${edit}">
									<a href="SetAuto.html?id=<c:out value="${auto.id}"/>"> <c:out
											value="${auto.marke}" />
									</a>
								</c:when>
								<c:otherwise>
									<a href="BeginFahrt.html?id=<c:out value="${auto.id}"/>">
										<c:out value="${auto.marke}" />
									</a>
								</c:otherwise>
							</c:choose></td>
							
						<td><c:out value="${auto.modell}" /></td>
						<td><c:out value="${auto.tarif}" /></td>
						<td><c:out value="${auto.km}" /></td>
						<td><c:out value="${auto.baujahr}" /></td>
						<td><c:out value="${auto.farbe}" /></td>
						<td><c:out value="${auto.kennzeichen}" /></td>
						

					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>
</body>
</html>
